package com.example.demo.controller;

import com.example.demo.model.ReadList;
import com.example.demo.model.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
public class UserController {

    @Value("${server.port}")
    private String port;

    @Autowired
    private Student student;

    @Resource
    private ReadList readList;

    @ResponseBody
    @RequestMapping("/sayhi")
    public String sayHi(){
        return "Hello World | port:" + port + student + readList;
    }
}
